<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@ page session="true"%>
<%@page import="java.util.*"%>
<%@page import="tr.com.argela.tap.mot.models.Project"%>
<%@page import="tr.com.argela.tap.mot.models.Module"%>
<%@page import="tr.com.argela.tap.mot.models.TestPoint"%>
<%@page import="tr.com.argela.tap.mot.models.TestCase"%>
<%@page import="tr.com.argela.tap.mot.models.User"%>
<%@page import="tr.com.argela.tap.mot.dao.ProjectDao"%>
<%@page import="tr.com.argela.tap.mot.dao.ModuleDao"%>
<%@page import="tr.com.argela.tap.mot.dao.TestPointDao"%>
<%@page import="tr.com.argela.tap.mot.dao.TestCaseDao"%>
<%@page import="java.sql.*"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
   <html>
<head>

<title>JSP Page</title>
<link rel="stylesheet" type="text/css" href="style/styles.css">
</head>
<body>
  
  <%
     User user = (User)request.getSession().getAttribute("userObject");
     String name = user.getName();
     Long id = user.getId();
%>
  <h4 align="right"><%=name%></h4>
  <h5 align="right"><a href="logout.jsp">Log out</a></h5>
       <dıv> <h1 align="center">MOT</h1><h5 align="center">Memory Of Testing</h5></dıv>

        <div align="left">
        <table align="left"><tr><td>
        <h3><a href="analystModel.jsp?id=<%=id%>">Modules</a></h3></td></tr><tr><td>
        <h3><a href="analystPoint.jsp?id=<%=id%>">Test points</a></h3></td></tr><tr><td>
        <h3><a href="analystCase.jsp?id=<%=id%>">Test Cases</a></h3></td></tr><tr><td>
        <h3><a href="export.jsp?id=<%=id%>">Export Document</a></h3></td></tr>
        </table></div>
       <dıv align="right">   
        <table><tr>
        <%


if(request.getParameter("id7")==null)
	response.sendRedirect("testPoints2.jsp");
   
TestPointDao tpointDao = new TestPointDao();   
TestPoint testpoint = tpointDao.checkpoint(Long.parseLong((String)request.getParameter("id7")));   
   %>     
       
        
        <th align="center"><%=testpoint.getName()%>'s test cases</th></tr>

<%
TestCaseDao testcaseDao = new TestCaseDao();
List<TestCase> testcases = testcaseDao.seetcase(Long.parseLong((String)request.getParameter("id7")));

for (TestCase testcase : testcases) {
%> 
<tr>
<td><a href="testcases2.jsp?id10=<%=testcase.getId()%>"><%=testcase.getName()%></a></td>
</tr>
<% 
}
%>

</table>
<table align="center">
        <tr><td>
	        <h3 align="left"><a href="createtestcase2.jsp?id11=<%=testpoint.getId()%>">Create Test Case</a></h3>
	    </td></tr>
	    
	    </table>
</dıv>

</body>
</html>